package openbang.account.service.entity;


import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.NotPersistent;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import openbang.common.vo.StatusEnum;

import com.google.gwt.user.client.rpc.IsSerializable;

import java.util.Date;


/**
 * 职员
 * 
 */
@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Employee implements IsSerializable {

	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private Long id;

	@Persistent
	private String userName="";

	@Persistent
	private String email="";

	@Persistent
	private String niceName="";

	@Persistent
	private String pwd="";

	@Persistent
	private Date regTime=new Date();

	@Persistent
	private String remark="";

	@Persistent
	private Integer status=StatusEnum.PENDING_VERIFY.getCode();

	@Persistent
	private Date updTime=new Date();

	/**
	 * 使用的头像
	 * @see MediaObject
	 */
	@Persistent
	private Long facePhotoId=0L;

	/**
	 * 使用的头像的显示url
	 *  displayPhoto.do?outputType=stream&blobKey=xxxxx
	 */
	@NotPersistent
	private String facePhotoUrl=null;
	
    public Employee() {
    }

	public Employee(Long id, String email, String niceName, String userName) {
		super();
		this.id = id;
		this.email = email;
		this.niceName = niceName;
		this.userName = userName;
	}



	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getEmail() {
		return this.email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getNiceName() {
		return this.niceName;
	}

	public void setNiceName(String niceName) {
		this.niceName = niceName;
	}

	public String getPwd() {
		return this.pwd;
	}

	public void setPwd(String pwd) {
		this.pwd = pwd;
	}

	public Date getRegTime() {
		return this.regTime;
	}

	public void setRegTime(Date regTime) {
		this.regTime = regTime;
	}

	public String getRemark() {
		return this.remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public Integer getStatus() {
		return this.status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Date getUpdTime() {
		return this.updTime;
	}

	public void setUpdTime(Date updTime) {
		this.updTime = updTime;
	}

	public String getUserName() {
		return this.userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public Long getFacePhotoId() {
		return facePhotoId;
	}

	public void setFacePhotoId(Long facePhotoId) {
		this.facePhotoId = facePhotoId;
	}

	public String getFacePhotoUrl() {
		return facePhotoUrl;
	}

	public void setFacePhotoUrl(String facePhotoUrl) {
		this.facePhotoUrl = facePhotoUrl;
	}
	
}